#include "wxPoints.h"
#include <wx/arrimpl.cpp>

WX_DEFINE_OBJARRAY(XYZArray);

wxPoints::wxPoints()
{
    //ctor
}

wxPoints::~wxPoints()
{
    arr.Clear();
}

wxPoints::wxPoints(const wxPoints& other)
{
    arr = other.arr;
}

int wxPoints::count() const
{
    return arr.size();
}

void wxPoints::addPoint(XYZ point)
{
    arr.Add(point);
}

XYZ* wxPoints::getPoint(long unsigned int index) const
{
    if(index < 0 || index >= arr.size()) return NULL;

    return &arr.Item(index);
}

XYZ* wxPoints::operator[] (const long unsigned int index)
{
    return getPoint(index);
}

void wxPoints::clear()
{
    arr.Clear();
}
